net/designware: Consecutive writes must have delay
authorArmando Visconti <[email protected]>
Mon, 26 Mar 2012 00:09:55 +0000 (00:09 +0000)
committerJoe Hershberger <[email protected]>
Wed, 4 Apr 2012 15:47:09 +0000 (10:47 -0500)
This patch solves a TX/RX problem which happens at 10Mbps, due to the
fact that we are not respecting 4 cyles of the phy_clk (2.5MHz) between
two consecutive writes on the same register.

Signed-off-by: Armando Visconti <[email protected]>
Signed-off-by: Amit Virdi <[email protected]>
drivers/net/designware.c

index fc14b70420615e4b89bbeb08dec9ee6e086c94d8..933032cfdef56b08300b4c88141e4e1a7a745d45 100644 (file)
@@ -175,8 +175,7 @@ static int dw_eth_init(struct eth_device *dev, bd_t *bis)
        writel(readl(&dma_p->opmode) | RXSTART, &dma_p->opmode);
        writel(readl(&dma_p->opmode) | TXSTART, &dma_p->opmode);
 
-       writel(readl(&mac_p->conf) | RXENABLE, &mac_p->conf);
-       writel(readl(&mac_p->conf) | TXENABLE, &mac_p->conf);
+       writel(readl(&mac_p->conf) | RXENABLE | TXENABLE, &mac_p->conf);
 
        return 0;
 }